#include <GL/gl.h>

#include "camera.h"

Camera::Camera() : _pos(0.0f,0.0f,0.0f), _rot(0.0f,0.0f,0.0f)
{
}

Camera::Camera(Vec3f pos, Vec3f rot) : _pos(pos), _rot(rot)
{
}

void Camera::point()
{
	glRotatef(-_rot.x, 1.0f, 0.0f, 0.0f);
	glRotatef(-_rot.y, 0.0f, 1.0f, 0.0f);
	glRotatef(-_rot.z, 0.0f, 0.0f, 1.0f);
	glTranslatef(-_pos.x, -_pos.y, -_pos.z);
}

void Camera::move(Vec3f d)
{
	_pos += d;
}

void Camera::rotate(Vec3f r)
{
	_rot += r;
}

Vec3f Camera::getLocation()
{
      return _pos;
}
